<template>
    <div class="desc_container">
        <h2 class="title">{{descArr.title}}</h2>
        <hr>
        <div class="d_content" v-html="descArr.content"></div>
    </div>
</template>

<script>
    export default {
        name: "goodsDesc",
        data(){
            return {
                id:this.$route.params.id,
                descArr:{}
            }
        },
        methods:{
            getDesc(){
                this.$http.get('api/goods/getdesc/'+this.id).then( result => {
                    console.log(result)
                    if (result.body.status === 0){
                        this.descArr = result.body.message[0];
                    }
                })
            }
        },
        created(){
            this.getDesc();
        }
    }
</script>

<style scoped lang="less">
    .desc_container{
        padding: 0 5px;
        .title{
            font-size: 16px;
            text-align: center;
            color: #226aff;
            margin: 12px 0;
        }
    }
</style>